package ch6;

public class MainBoard {
	String name;

	public void insert(USB u) {
		System.out.println("USb设备" + u + " 接上了主板：" + name);
		u.plugin();
		System.out.println("过了一会，用完了。。。");
		u.unplugin();
	}

	public static void main(String[] args) {
		MainBoard m = new MainBoard();
		m.name = "华硕主板";
		UsbKeyBoard k = new UsbKeyBoard("双飞燕");
		m.insert(k);
		m.insert(new UsbMouse("罗技", 29));
	}

}
